/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package general;

import conexion.CConexion;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import validaciones.CLogin;

/**
 *
 * @author SISTEMAS
 */
public class CCl100 extends CConexion {

    private CLogin loginU = new CLogin();

    public CCl100() {
        super();
    }

    public ResultSet buscarClientes(String cliente) throws SQLException {
        Statement stncBuscarClientes = this.getConexion().createStatement();
        String sqlBuscarClientes = "select * from cl100 where cl100nocia = '" + loginU.getCompaniaActual() + "'";
        ResultSet rsBuscarClientes = null;
        if (!cliente.isEmpty()) {
            sqlBuscarClientes += " and cl100nocl like '%" + cliente + "%'";
        }
        sqlBuscarClientes += " order by cl100cocl";
        rsBuscarClientes = stncBuscarClientes.executeQuery(sqlBuscarClientes);
        return rsBuscarClientes;
    }
}
